package com.we823.cms.model.extension;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.we823.cms.model.BaseModelWithDate;

@Entity
@Table(name="ex_product")
public class Product extends BaseModelWithDate<Integer> {
	private static final long serialVersionUID = -2829767602798139929L;

	@Column(name="name",length=100)
	private String name;
	private String code;
	
	@Transient
	private ProductCategory category;
	@Column(name="category_id")
	private Integer categoryId;
	
	@Transient
	private Brand brand;
	private Integer brandId;
	
	private String model;
	private String description;
	
	private String photo;
	
	private int hits=1;
	
	@Transient
	private List<ProductPhoto> photos;
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public ProductCategory getCategory() {
		return category;
	}
	public void setCategory(ProductCategory category) {
		this.category = category;
	}

	public String getModel() {
		return model;
	}
	public void setModel(String model) {
		this.model = model;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public Brand getBrand() {
		return brand;
	}
	public void setBrand(Brand brand) {
		this.brand = brand;
	}
	public String getPhoto() {
		return photo;
	}
	public void setPhoto(String photo) {
		this.photo = photo;
	}
	public List<ProductPhoto> getPhotos() {
		return photos;
	}
	public void setPhotos(List<ProductPhoto> photos) {
		this.photos = photos;
	}
	public int getHits() {
		return hits;
	}
	public void setHits(int hits) {
		this.hits = hits;
	}

	public Integer getCategoryId() {
		return categoryId;
	}

	public void setCategoryId(Integer categoryId) {
		this.categoryId = categoryId;
	}

	public Integer getBrandId() {
		return brandId;
	}

	public void setBrandId(Integer brandId) {
		this.brandId = brandId;
	}
}
